package getMinimumTime;

public class Solution {
    public int getMinimumTime(int[] time, int[][] fruits, int limit) {
        //
        int ans = 0;
        for (int[] fruit: fruits) {
            int t = fruit[1]/limit+(fruit[1]%limit==0?0:1);
            ans+=time[fruit[0]]*t;
        }
        return ans;
    }
}
